package forum.business.facades;

import java.util.List;

import forum.business.appservices.UserAppService;
import forum.business.entities.UserBO;
import forum.util.exceptions.AdException;

public class UserFacade {

	public UserFacade(){}
	
	public void createUser(UserBO userBO) throws AdException {
		UserAppService userAppService = new UserAppService();
		userAppService.createUser(userBO);
	}
	
	public UserBO getUser(String login) throws AdException {
		UserAppService userAppService = new UserAppService();
		return userAppService.getUser(login);
	}
	public List<UserBO> listUsers() throws AdException {
		UserAppService userAppService = new UserAppService();
		return userAppService.listUsers();
	}
	
	public void removeUser(String login) throws AdException {
		UserAppService userAppService = new UserAppService();
		userAppService.removeUser(login);
	}
	
	public void updateUser(UserBO userBO) throws AdException {
		UserAppService userAppService = new UserAppService();
		userAppService.updateUser(userBO);
	}
}
